home *** CD-ROM | disk | FTP | other *** search
- Path: news.cnetech.com!news
- From: codepoet <codepoet@cnetech.com>
- Newsgroups: comp.lang.c++
- Subject: extern Login *lgn; is this all there is?
- Date: 18 Jan 1996 03:11:00 GMT
- Organization: Nation BBS Systems
- Message-ID: <4dkdo4$rlp@news.cnetech.com>
- NNTP-Posting-Host: dialup18.cnetech.com
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 1.22 (Windows; U; 16bit)
-
- I am writeing a BBS. It is compiled with Turbo C++ 3.0. The first version
- of this BBS was written in standard C with the same compiler. In this new
- version, I wanted to use OOP. My first module was BWork, a binary record
- keeper. It basically loads and saves binary records, like my other module
- UserRec. I use BWork in UserRec, since User Records are Binary records and
- need to be saved and loaded from disk. At the top of UserRec I declare
- BWork as an extern, because BWork is used in many other modules, and not
- just UserRec. There are about 50 other modules also, like Login, Mail,
- MesgBase (which is derrived from Mail f coarse), etc. At the top of all of
- thoese modules, I must include my extern statements to include all other
- modules that this module will require. After a while I feel as if I am
- violating some C++ rule of ethics because almost every module needs
- another (with maybe the exception of Tyme and Dayt). My question is this:
- Is it accepted practice to have a list of 10 or more extern's in each
- module? Or is it true that somewhere down the line, my Object methodology
- got bumbled and there *really* is a way to have modules with no module
- needing another module. Basically, if I wanted to let someone else use my
- userRec class, they would be stuck with 10 other classs! What can be done?
-
-
-